package cn.zwx.learn.mybatis.example.croe.plugin;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

/**
 * 对插件代理类进行封装
 * @author zhangwenxue 
 * @date 2022/5/7 21:33
*/
@Data
@AllArgsConstructor
public class Invocation {

    private Object target;
    private Method method;
    private Object[] args;

    public Object proceed() throws InvocationTargetException, IllegalAccessException {
       return method.invoke(target, args);
    }
}
